<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/templates/tmpl_game.xhtml">
	<ui:define name="centro">

		<h:form id="form">
			<p:dataTable id="listaJogador" var="jogador"
				value="#{jogadorMBean.jogadoresOrderExp}" paginator="true" rows="10"
				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="5,10,15"
				emptyMessage="Nenhum jogador cadastrado"
				resizableColumns="true"
				rowKey="#{jogador.email}"
				rowIndexVar="rowIndex">

				<f:facet name="header">
					Rank de Jogadores
				</f:facet>
				
				<p:column headerText="Posição">
					<p:outputLabel value="#{rowIndex+1}" />
				</p:column>

				<p:column headerText="E-mail">
					<p:outputLabel value="#{jogador.email}" />
				</p:column>

				<p:column headerText="Nome">
					<p:outputLabel value="#{jogador.nome}" />
				</p:column>

				<p:column headerText="Experiência">
					<p:outputLabel value="#{jogador.experiencia}" />
				</p:column>

				<p:column headerText="Nível">
					<p:outputLabel value="#{jogador.nivel.descricao}" />
				</p:column>

				<p:column headerText="Papel">
					<p:outputLabel value="#{jogador.papel.descricao}" />
				</p:column>

			</p:dataTable>

		</h:form>

	</ui:define>
</ui:composition>

</html>
